package com.tbsoft.ehr.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 部门信息
 * 
 * @author lizhenhua
 * 
 */
@Entity
@Table(name = "EHR_DEPARTMENT")
public class Department extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String id;
	private String name;
	private String desc;

	public Department(){
		super();
	}
	
	public Department(String id){
		this.id = id;
	}
	
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(name = "DEPT_ID")
	public String getId() {
		return id;
	}

	@Column(name = "DEPT_NAME", nullable = false, length = 50,unique=true)
	public String getName() {
		return name.trim();
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "DEPT_DESC", length = 250)
	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}	

}
